//购物车相关的
import http from '../request';
//更新购物车
export function putCartApi(id, data) {
  return http({
    method: 'put',
    url: `/api/shop/shoppingCart/${id}`,
    data,
  });
}
//添加购物车
export function addCartApi(data) {
  return http({
    method: 'post',
    url: '/api/shop/shoppingCart',
    data,
  });
}
//获取购物车
export function getCartListApi(params) {
  return http({
    method: 'get',
    url: '/api/shop/shoppingCart',
    params,
  });
}
//删除购物车
export function delCartApi(id) {
  return http({
    method: 'delete',
    url: `/api/shop/shoppingCart/${id}`,
  });
}
